﻿<include file="Layout/header" />
<body>

      <div class="page-content">
        <div class="page-header">
          <h1> 财务管理 <small> <i class="icon-double-angle-right"></i> 报表 </small> </h1>
        </div>
        <!-- /.page-header -->
        <div class="">
                    <div class="tabbable">
                  <ul class="nav nav-tabs" id="myTab">
        <foreach name="lottry_array" item="val" key="key">
           <li>
              <if condition="$key eq $c_id">
             <a class="btn btn-primary" href="{:U('Admin/Bet/baobiao',array('c_id'=>$key))}">{$val.text}</a>
              <else />
              <a class="btn btn-info" href="{:U('Admin/Bet/baobiao',array('c_id'=>$key))}">{$val.text}</a>
               </if>
          </li>
         </foreach>
      </ul>
                      <div class="tab-content">

                      <table class="table table-bordered table-hover table-condensed">
      <tbody>
              <form method="get" action="{:U('Admin/Bet/baobiao')}">
     
        <tr>
          <th style="vertical-align:middle;">日期范围</th>
          <td>   <div class="col-xs-3">
              <div class="input-group input-group-sm">
                <input id="datepicker" class="form-control hasDatepicker" name="strtime" type="text" value="<?php echo $_GET['strtime'];?>">
                <span class="input-group-addon"> <i class="icon-calendar"></i> </span> </div>
             </div>
             <div class="col-xs-1" style="padding: 5px 18px;">至</div>
             <div class="col-xs-3">
              <div class="input-group input-group-sm">
              <input name="c_id" type="hidden" value="{$c_id}">
                <input id="datepicker1" class="form-control hasDatepicker" name="endtime" type="text" value="<?php echo $_GET['endtime'];?>">
                <span class="input-group-addon"> <i class="icon-calendar"></i> </span> </div>
             </div> 
           
          </td>
        </tr>
        <tr>
          <th style="vertical-align:middle;">结算状态</th>
          <td>
            <label><input name="settle" value="1" <if condition="$settle eq 1" >checked="checked"</if> type="radio">已 结 算</label>
            <label style="color:blue;"><input name="settle" value="2"<if condition="$settle eq 2" >checked="checked"</if> type="radio">未 结 算</label>
          </td>
        </tr>
        <tr>
          <td></td>
          <td><input class="btn btn-success" type="submit" value="提交"></td>
        </tr>
          </form>
      </tbody></table>
 
                        <div class="table-responsive dataTables_wrapper">
                  
                
                  <table id="sample-table-1" class="table table-center table-striped table-bordered table-hover dataTable">
                    <thead>
                      <tr>
                        <th colspan="19"></th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr class="shead">
                     
                        <th rowspan="2" style="vertical-align:middle;">笔数</th>
                        <th rowspan="2" style="vertical-align:middle;">下注金额</th>
                        <th rowspan="2" style="vertical-align:middle;">有效金额</th>
                        <th rowspan="2" style="vertical-align:middle;">无效金额</th>
                        <th colspan="4" style="vertical-align:middle;">输赢</th>
                     
                    
                      </tr>
                      <tr class="shead">
                        <th>平台赢</th>
						<th>下注返水</th>
                       <th>平台赔钱</th>
                        <th>代理返水</th>
                        <th>盈亏结果</th>
                      
                
                      </tr>
                   
                      <tr class="">
                  
                        <td><if condition="$v.cout eq ''">0<else/>{$v.cout}</if></td>
                        <td><a href="javascript:;"><if condition="$v.money eq ''">0.00<else/>{$v.money}</if></a></td>
                       
                         <td><a href="javascript:;"><if condition="$v.money eq ''">0.00<else/>{$v.money}</if></a></td>
                         <td><a href="javascript:;"><if condition="$v.he eq ''">0.00<else/>{$v.he}</if></a></td>
                        <td><if condition="$v.lost eq ''">0.00<else/><?php echo abs($v['lost']);?></if></td>
						 <td><a href="javascript:;"><if condition="$v.rebate eq ''">0.00<else/>{$v.rebate}</if></a></td>
                        <td><if condition="$v.win eq ''">0.00<else/><i style="color:#EA4848">-{$v.win}</i></if></td>
						
                        <td><if condition="$v.shui eq ''">0.00<else/>{$v.shui}</if></td>
                        <td><?php echo abs($v['lost'])-abs($v['win'])-$v['shui'];?></td>
                     
                
                        
                      </tr>
                     
                    </tbody>
                  </table>
                  <!-- <div class="row">
                    <div style="text-align: center;">
                      <button type="button" class="btn btn-info">确认修改</button>
                    </div>
                  </div> -->
                </div>
                <!-- /.table-responsive --> 
                      </div>
                    </div>
                  </div><!-- /span -->
        

                
      
      </div>
      <!-- /.page-content --> 
  
    
  </div>

<div >{$order.page}</div>
</div>
</div>
<include file="Layout/js"/> 
<script src="__ADMIN_JS__/bootbox.js"></script>
<link href="__ADMIN_CSS__/datepicker.css" rel="stylesheet" />
<script src="__ADMIN_JS__/date-time/bootstrap-datepicker.min.js"></script>
<script type="text/javascript">
			jQuery(function($) {
				$("#datepicker").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				});
				 
				$("#datepicker1").datepicker({
					showOtherMonths: true,
					selectOtherMonths: false,
					 
				}); 
				
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
  				
			})
 		</script> 
</body>
</html>